package com.project.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.project.domain.entity.DmBudgetSubject;
import com.project.mapper.BudgetSubjectMapper;
import com.project.service.IBudgetSubjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 预算科目Service业务层处理
 *
 * @author ruoyi
 * @date 2025-02-08
 */
@Service
public class BudgetSubjectServiceImpl extends ServiceImpl<BudgetSubjectMapper, DmBudgetSubject> implements IBudgetSubjectService {
    @Autowired
    private BudgetSubjectMapper dmBudgetSubjectMapper;

    /**
     * 查询预算科目
     *
     * @param ID 预算科目主键
     * @return 预算科目
     */
    @Override
    public DmBudgetSubject selectDmBudgetSubjectByID(String ID) {
        return dmBudgetSubjectMapper.selectDmBudgetSubjectByID(ID);
    }

    /**
     * 查询预算科目列表
     *
     * @param dmBudgetSubject 预算科目
     * @return 预算科目
     */
    @Override
    public List<DmBudgetSubject> selectDmBudgetSubjectList(DmBudgetSubject dmBudgetSubject) {
        return dmBudgetSubjectMapper.selectDmBudgetSubjectList(dmBudgetSubject);
    }

    /**
     * 新增预算科目
     *
     * @param dmBudgetSubject 预算科目
     * @return 结果
     */
    @Override
    public int insertDmBudgetSubject(DmBudgetSubject dmBudgetSubject) {
        return dmBudgetSubjectMapper.insertDmBudgetSubject(dmBudgetSubject);
    }

    /**
     * 修改预算科目
     *
     * @param dmBudgetSubject 预算科目
     * @return 结果
     */
    @Override
    public int updateDmBudgetSubject(DmBudgetSubject dmBudgetSubject) {
        return dmBudgetSubjectMapper.updateDmBudgetSubject(dmBudgetSubject);
    }

    /**
     * 批量删除预算科目
     *
     * @param IDs 需要删除的预算科目主键
     * @return 结果
     */
    @Override
    public int deleteDmBudgetSubjectByIDs(String[] IDs) {
        return dmBudgetSubjectMapper.deleteDmBudgetSubjectByIDs(IDs);
    }

    /**
     * 删除预算科目信息
     *
     * @param ID 预算科目主键
     * @return 结果
     */
    @Override
    public int deleteDmBudgetSubjectByID(String ID) {
        return dmBudgetSubjectMapper.deleteDmBudgetSubjectByID(ID);
    }
}
